home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
libs
/
pdcurs21
/
private
/
_gcurcol.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-06-18
|
1KB
|
65 lines
#define CURSES_LIBRARY 1
#include <curses.h>
#ifdef PDCDEBUG
char *rcsid__gcurcol = "$Header: C:\CURSES\private\RCS\_gcurcol.c 2.1 1993/06/18 20:23:20 MH Rel MH $";
#endif
/*man-start*********************************************************************
PDC_get_cur_col() - get current column position of cursor
PDCurses Description:
This is a private PDCurses function
This routine returns the current column position of the cursor on
screen.
PDCurses Return Value:
This routine returns the current column position of the cursor. No
error is returned.
PDCurses Errors:
There are no defined errors for this routine.
Portability:
PDCurses int PDC_get_cur_col( void );
**man-end**********************************************************************/
int PDC_get_cur_col(void)
{
#ifdef OS2
USHORT curCol, curRow;
#endif
#ifdef PDCDEBUG
if (trace_on) PDC_debug("PDC_get_cur_col() - called\n");
#endif
#ifdef FLEXOS
retcode = s_get(T_VIRCON, 1L, (char *) &vir, (long) sizeof(vir));
return( (retcode < 0L) ? ERR : vir.vc_cursor.pos_col );
#endif
#ifdef DOS
regs.x.ax = 0x0003;
regs.h.bh = _cursvar.video_page;
int86(0x10, ®s, ®s);
return((int) regs.h.dl);
#endif
#ifdef OS2
/* find the current cursor position */
VioGetCurPos ((PUSHORT) &curRow, (PUSHORT) &curCol, 0);
return (curCol);
#endif
#ifdef UNIX
/* INCOMPLETE */
#endif
}